package com.jxj.service;

import java.util.List;

import javax.annotation.Resource;

import org.hibernate.Query;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.jxj.daoImpl.HelpDaoImpl;
import com.jxj.entity.Demand;
import com.jxj.entity.Receive;
import com.jxj.entity.User;


@Service
@Transactional
public class HelpServiceImpl {
	@Resource
	private HelpDaoImpl impl;
	public void addDemand(User user,Demand demand,String xuehao,double price){
		impl.addDemand(user,demand,xuehao,price);

	}
	
	public List<Demand> findAll(int pageNum, int pageSize){
		return impl.findAll(pageNum, pageSize);
		
	}
	
	public void addRecive(User user,Demand demand,Receive receive){
		impl.addRecive(user, demand, receive);
	}
	public void updateAccept(Demand demand){
		impl.updateAccept(demand);
	}
	public boolean findUdid(int did ){
		
		if(impl.findUdid(did)){
			return true;
		}
		else {
			return false;
		}
	}
				
/*	public int count(){
		
		impl.findCount();
		return 0;
		
	}*/

}
